home *** CD-ROM | disk | FTP | other *** search
/ Clickx 47 / Clickx 47.iso / assets / software / Miro_Installer.exe / Miro_Downloader.exe / compiled_templates / download_item_thumbnail.pyc (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2008-01-10  |  3.8 KB  |  84 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.5)
  3.  
  4. from template import Handle, fillAttr, quoteAndFillAttr, fillStaticTemplate
  5. from StringIO import StringIO
  6. from xhtmltools import urlencode
  7. from templatehelper import quoteattr, escape
  8. from string import Template
  9. import app
  10. import views
  11. import sorts
  12. import indexes
  13. import filters
  14. import resources
  15. import gtcache
  16. _ = gtcache.gettext
  17.  
  18. def fillTemplate(domHandler, dtvPlatform, eventCookie, bodyTagExtra, *args, **kargs):
  19.     localvars = locals()
  20.     localvars.update(globals())
  21.     handle = Handle(domHandler, localvars, onUnlink = (lambda : None))
  22.     out = StringIO()
  23.     out.write(u'<?xml version="1.0" encoding="utf-8"?>\n<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n')
  24.     out.write(u'<html dtvPlatform="')
  25.     out.write(quoteattr(urlencode(dtvPlatform)))
  26.     out.write(u'" eventCookie="')
  27.     out.write(quoteattr(urlencode(eventCookie)))
  28.     out.write(u'" xmlns:t="http://www.participatorypolitics.org/" xmlns="http://www.w3.org/1999/xhtml" xmlns:i18n="http://www.participatoryculture.org/i18n">\n<head>\n    <meta content="text/html; charset=utf-8" http-equiv="content-type"></meta>        \n</head>\n<body')
  29.     out.write(u' ' + bodyTagExtra)
  30.     out.write(u'>\n    <img src="')
  31.     out.write(quoteattr(this.getThumbnail()))
  32.     out.write(u'" alt="" class="main-video-tnail" id="video-tnail-')
  33.     out.write(quoteattr(viewName + str(this.getID())))
  34.     out.write(u'"></img>\n\n    <div class="main-video-hitbox">\n        ')
  35.     if not not this.isDownloadable():
  36.         out.write(u'<a href="#" class="icon download" onclick="return eventURL(\'action:startDownload?item=')
  37.         out.write(quoteattr(urlencode(this.getID())))
  38.         out.write(u'\');" title="Download \'')
  39.         out.write(quoteattr(this.getTitle()))
  40.         out.write(u'\'"></a>')
  41.     
  42.     out.write(u'\n        ')
  43.     if not not (this.getState() == 'paused'):
  44.         out.write(u'<a href="#" class="icon paused-circle" onclick="return eventURL(\'action:startDownload?item=')
  45.         out.write(quoteattr(urlencode(this.getID())))
  46.         out.write(u'\');" title="Download \'')
  47.         out.write(quoteattr(this.getTitle()))
  48.         out.write(u'\'"></a>')
  49.     
  50.     out.write(u'\n        ')
  51.     if not not (this.getState() == 'downloading'):
  52.         out.write(u'<span class="icon inprogress-background">\n            ')
  53.         if not this.isPendingManualDownload():
  54.             out.write(u'<img src="')
  55.             out.write(quoteattr(resources.url(u'images/main-video-inprogress-arrows.gif')))
  56.             out.write(u'" title="Downloading \'')
  57.             out.write(quoteattr(this.getTitle()))
  58.             out.write(u'\'" class="inprogress-arrows"></img>')
  59.         
  60.         out.write(u'\n            ')
  61.         if not not this.isPendingManualDownload():
  62.             out.write(u'<img src="')
  63.             out.write(quoteattr(resources.url(u'images/download-pending-dot.png')))
  64.             out.write(u'" class="download-pending-icon" title="Download Pending for \'')
  65.             out.write(quoteattr(this.getTitle()))
  66.             out.write(u'\'"></img>')
  67.         
  68.         out.write(u'\n        </span>')
  69.     
  70.     out.write(u'\n        ')
  71.     if not not this.isPlayable():
  72.         out.write(u'<a href="#" class="icon play" onclick="return eventURL(\'action:playViewNamed?viewName=')
  73.         out.write(quoteattr(urlencode(viewName)))
  74.         out.write(u'&firstItemId=')
  75.         out.write(quoteattr(urlencode(this.getID())))
  76.         out.write(u'\');" title="Play \'')
  77.         out.write(quoteattr(this.getTitle()))
  78.         out.write(u'\'"></a>')
  79.     
  80.     out.write(u'\n    </div>\n</body>\n</html>')
  81.     out.seek(0)
  82.     return (out, handle)
  83.  
  84.